home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / circuits / spice2g6.z / spice2g6 / spice / Fortran / lnkref.f < prev    next >
Encoding:
Text File  |  1989-02-03  |  2.8 KB  |  105 lines

  1.       subroutine lnkref
  2.       implicit double precision (a-h,o-z)
  3. c
  4. c     this routine resolves all unsatisfied name references.
  5. c
  6. c spice version 2g.6  sccsid=tabinf 3/15/83
  7.       common /tabinf/ ielmnt,isbckt,nsbckt,iunsat,nunsat,itemps,numtem,
  8.      1   isens,nsens,ifour,nfour,ifield,icode,idelim,icolum,insize,
  9.      2   junode,lsbkpt,numbkp,iorder,jmnode,iur,iuc,ilc,ilr,numoff,isr,
  10.      3   nmoffc,iseq,iseq1,neqn,nodevs,ndiag,iswap,iequa,macins,lvnim1,
  11.      4   lx0,lvn,lynl,lyu,lyl,lx1,lx2,lx3,lx4,lx5,lx6,lx7,ld0,ld1,ltd,
  12.      5   imynl,imvn,lcvn,nsnod,nsmat,nsval,icnod,icmat,icval,
  13.      6   loutpt,lpol,lzer,irswpf,irswpr,icswpf,icswpr,irpt,jcpt,
  14.      7   irowno,jcolno,nttbr,nttar,lvntmp
  15. c spice version 2g.6  sccsid=cirdat 3/15/83
  16.       common /cirdat/ locate(50),jelcnt(50),nunods,ncnods,numnod,nstop,
  17.      1   nut,nlt,nxtrm,ndist,ntlin,ibr,numvs,numalt,numcyc
  18. c spice version 2g.6  sccsid=flags 3/15/83
  19.       common /flags/ iprnta,iprntl,iprntm,iprntn,iprnto,limtim,limpts,
  20.      1   lvlcod,lvltim,itl1,itl2,itl3,itl4,itl5,itl6,igoof,nogo,keof
  21. c spice version 2g.6  sccsid=blank 3/15/83
  22.       common /blank/ value(200000)
  23.       integer nodplc(64)
  24.       complex cvalue(32)
  25.       equivalence (value(1),nodplc(1),cvalue(1))
  26. c
  27. c  mutual inductors
  28. c
  29.       loc=locate(4)
  30.   100 if (loc.eq.0) go to 200
  31.       iref=nodplc(loc+2)
  32.       call fndnam(value(iunsat+iref),loc-1,loc+2,3)
  33.       iref=nodplc(loc+3)
  34.       call fndnam(value(iunsat+iref),loc-1,loc+3,3)
  35.       loc=nodplc(loc)
  36.       go to 100
  37. c
  38. c  current-controlled current source
  39. c
  40.   200 loc=locate(7)
  41.   210 if (loc.eq.0) go to 300
  42.       nump=nodplc(loc+4)
  43.       locp=nodplc(loc+6)
  44.       do 220 i=1,nump
  45.       iref=nodplc(locp+i)
  46.       call fndnam(value(iunsat+iref),loc-1,locp+i,9)
  47.   220 continue
  48.       loc=nodplc(loc)
  49.       go to 210
  50. c
  51. c  current-controlled voltage sources
  52. c
  53.   300 loc=locate(8)
  54.   310 if (loc.eq.0) go to 400
  55.       nump=nodplc(loc+4)
  56.       locp=nodplc(loc+7)
  57.       do 320 i=1,nump
  58.       iref=nodplc(locp+i)
  59.       call fndnam(value(iunsat+iref),loc-1,locp+i,9)
  60.   320 continue
  61.       loc=nodplc(loc)
  62.       go to 310
  63. c
  64. c  diodes
  65. c
  66.   400 loc=locate(11)
  67.   410 if (loc.eq.0) go to 500
  68.       iref=nodplc(loc+5)
  69.       call fndnam(value(iunsat+iref),loc-1,loc+5,21)
  70.       loc=nodplc(loc)
  71.       go to 410
  72. c
  73. c  bjts
  74. c
  75.   500 loc=locate(12)
  76.   510 if (loc.eq.0) go to 600
  77.       iref=nodplc(loc+8)
  78.       call fndnam(value(iunsat+iref),loc-1,loc+8,22)
  79.       loc=nodplc(loc)
  80.       go to 510
  81. c
  82. c  jfets
  83. c
  84.   600 loc=locate(13)
  85.   610 if (loc.eq.0) go to 700
  86.       iref=nodplc(loc+7)
  87.       call fndnam(value(iunsat+iref),loc-1,loc+7,23)
  88.       loc=nodplc(loc)
  89.       go to 610
  90. c
  91. c  mosfets
  92. c
  93.   700 loc=locate(14)
  94.   710 if (loc.eq.0) go to 1000
  95.       iref=nodplc(loc+8)
  96.       call fndnam(value(iunsat+iref),loc-1,loc+8,24)
  97.       loc=nodplc(loc)
  98.       go to 710
  99. c
  100. c  finished
  101. c
  102.  1000 call clrmem(iunsat)
  103.       return
  104.       end
  105.